/*
 * Copyright 2010 Mark Eschbach.
 *
 * $HeadURL$
 * $Id$
 */
package com.meschbach.cise.util;

import com.meschbach.cise.Compute;
import java.math.BigInteger;

/**
 *
 * @author "Mark Eschbach" &lt;meschbach@gmail.com&gt;
 */
public class IntToBigInteger implements Compute<Integer, BigInteger, Exception> {

    public BigInteger compute(Integer input) throws Exception {
        try {
            return BigInteger.valueOf(input);
        } catch (NumberFormatException nfe) {
            throw new Exception("Unable to convert '" + input.toString() + "' to an arbatrary length integer", nfe);
        }
    }
}
